
function linePen(resolve) {
  this.move = function(b, e, c) {
    if (b)return {b, e, c}
  }
  this.end = function(b, e) {
    if (b)resolve({b, e})
  }
}
linePen.moveBegin = true
linePen.render = function(ctx, data) {
  if (data && data.b && data.e) {
    var x = data.b.x
    var y = data.b.y
    var a = data.e.x - x
    var b = data.e.y - y
    ctx.strokeStyle = 'ragb(0,0,0)'
    ctx.strokeRect(x, y, a, b)
  }
}

export default linePen
